<template>
	<view>
		<!-- 选择客户 -->
		<u-picker :show="message.rukulxShow" :columns="columnsruku" :title="title" @cancel="rukuconfirm" @confirm="rukuconfirm"
			keyName="name"></u-picker>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		name:"selectRuku",
		props:{
			message:{}
		},
		data() {
			return {
				// type==1入库单类型，type==2出库单类型
				columnsruku:[],
				title:"选择入库类型"
			};
		},
		created() {
			if(this.message.type==1){
				//类型:1=采购入库单,2=销售退货入库单,3=其他入库单,4=销售单拒收入库单,5=销售单退货商品入库单,0=全部
				this.columnsruku = [[{
					id:1,
					name:"采购入库单"
				},
				{
					id:2,
					name:"销售退货入库单"
				},
				{
					id:3,
					name:"其他入库单"
				},
				{
					id:4,
					name:"销售单拒收入库单"
				},
				{
					id:5,
					name:"销售单退货商品入库单"
				}]]
			}else if(this.message.type==2){
				// 类型:1=采购退货出库单,2=销售单出库单,3=其他出库单,0=全部
				this.columnsruku = [[{
					id:1,
					name:"采购退货出库单"
				},
				{
					id:2,
					name:"销售单出库单"
				},
				{
					id:3,
					name:"其他出库单"
				}]];
				this.title = "选择出库类型"
			}
		},
		methods:{
			rukuconfirm(e){
				this.$emit("rukuSure", e);
			}	
		}
	}
</script>

<style>

</style>